/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button, TouchableHighlight} from 'react-native';

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  android:
    '双击设备上的 R 键以重新加载，\n' +
    '摇晃或按 menu 键查看开发菜单',
});

function onPressBtn () {
  alert('OK!');
}

type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>欢迎来到 React Native！</Text>
        <Text style={styles.instructions}>要开始，请编辑 App.js</Text>
        <Text style={styles.instructions}>{instructions}</Text>

        <TouchableHighlight 
                style ={{
                    height: 40,
                    width:160,
                    borderRadius:50,
                    backgroundColor : "yellow",
                    marginLeft :50,
                    marginRight:50,
                    marginTop :20,
                    
                }}>
            <Button onPress={onPressBtn} title="Are You OK?"/>
          </TouchableHighlight> 
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
  btn: {
    color: 'blue',
    fontWeight: 'bold',
    fontSize: 30,
  },
});
